<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
    <title>统一认证中心</title>

    <#import "../common/common.macro.ftl" as netCommon>
    <@netCommon.commonStyle />

</head>
<body class="hold-transition login-page">

<div class="login-box">
    <form id="updateDepForm" >
        <div class="login-box-body">
            <p class="login-box-msg">修改部门</p>
            <div id="depNamediv" class="form-group">
                <label>部门名</label>
                <input type="hidden" class="form-control" name="id" value="${dep.id}">
                <input type="hidden" class="form-control" name="oldName" value="${dep.depName}">
                <input id="depName" type="text" class="form-control" name="depName" value="${dep.depName}">
                <span id="depNameMsg" class="help-block"></span>
            </div>
            <div id="depDescdiv" class="form-group">
                <label>部门描述</label>
                <input id="depDesc" type="text" class="form-control" name="depDesc" value="${dep.depDesc!''}">
                <span id="depDescMsg" class="help-block"></span>
            </div>
            <div class="form-group">
                <label>上级部门</label>
                <select id="pid" name="pid" class="form-control select2" data-placeholder="Select a State" style="width: 100%;">
                    <option  value=""></option>
                    <#list deps as item>
                        <option <#if dep.pid?exists && dep.pid == item.id >selected</#if> value="${item.id}">${item.depName}</option>
                    </#list>
                </select>
            </div>
            <input id="pname" type="hidden" class="form-control" name="pname">
            <div class="row">
                <div class="col-xs-4">
                    <button onclick="updateDep()" type="button" class="btn btn-primary btn-block btn-flat">提交</button>
                </div>
            </div>
        </div>
    </form>
</div>

</body>
<@netCommon.commonScript />
<script src="${request.contextPath}/static/js/manage.js"></script>
</html>